﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using zhangmenren.IService;
using zhangmenren.Models;
using zhangmenren.Repository;

namespace zhangmenren.Service
{
    public class ClassMSService:IClassMSGService
    {

        private ClassMSRepository classMSRepository = new ClassMSRepository();

        public Task<int> Add(ClassifyEntity entity)
        {
            return Task.FromResult(classMSRepository.Add(entity));
        }

        public Task<int> Del(int id)
        {
            return Task.FromResult(classMSRepository.Del(id));
        }

        public Task<int> EditState(int id, bool state)
        {
            return Task.FromResult(classMSRepository.EditState(id,state));
        }

        public Task<IEnumerable<ClassifyEntity>> Select()
        {
            return Task.FromResult(classMSRepository.Select());
        }
    }
}
